<?php
class ImpSoft_View_Helper_Clickable {

    public function clickable($text) {
    
        $ret = eregi_replace( "([[:alnum:]]+)://([^[:space:])>]*)([[:alnum:]#?/&=])", "<a href=\"\\1://\\2\\3\" target=\"_blank\">\\1://\\2\\3</a>", $text); 
        $ret = eregi_replace( "(([a-z0-9_]|\\-|\\.)+@([^[:space:]]*)([[:alnum:]-]))", "<a href=\"mailto:\\1\">\\1</a>", $ret); 
        return $ret;
    
    }

}